<?
require_once("conn.php");
?>
<table border="1">
	<tr>
		<th width="50">Order ID</th>
		<th width="150">Order Date</th>
		<th width="100">Send By</th>
		<th width="50">&nbsp;</th>
	</tr>
	<?
		$sql = "SELECT * FROM pch_sendisland ORDER BY id DESC;";
		$query = mysql_query($sql);
		while($row = mysql_fetch_array($query)){
		?>
			<tr>
				<td align="center"><?=$row["id"]?></td>
				<td align="center"><?=$row["sendDate"]?></td>
				<td align="center"><?=$row["sendby"]?></td>
				<td align="center">
					<?
						if($row["state"] == "0"){
					?>
							<a href="#" onclick="acceptDetail('<?=$row["id"]?>')">Accept</a>
					<?
						}else{
					?>
							<a href="#" onclick="viewAcceptDetail('<?=$row["id"]?>')">View</a>
					<?
						}
					?>
				</td>

			</tr>
		<?

		}
	?>
</table>